The present invention relates to a semiconductor device wherein control of the stop and supply of power and clocks is performed in block units of internal circuits, and relates to a technology effective if applied to, for example, a microcomputer.
As a semiconductor device such as a microcomputer, there is known one having the function of in order to reduce power consumption at standby mode (standby state), for example, dividing the inside of a semiconductor device into functional blocks, and individually controlling the supply and stop of power and individually supplying or stopping clocks to the functional blocks. For example, control registers which give instructions or data for the stop or supply of power and clocks, are respectively disposed in a power control circuit and a clock control circuit for controlling each functional block. A central processing unit executes an instruction to operate each of the control registers, thereby making it possible to control the stop and supply of the power and clocks.
Added to that, a patent document 1 (Japanese Unexamined Patent Publication No. 2008-181329, also US20080178030A1) has described that an interrupt power control table is disposed in a power control circuit, and the supply and resumption of power and clocks are carried out in each functional block by interrupt control conducted in accordance with the interrupt power control table. Further, a patent document 2 (Japanese Unexamined Patent Publication No. Hei 11(1999)-202968, also U.S. Pat. No. 6,055,642) has described that an external signal supplied from an external terminal is used to thereby make a transition to a low power consumption mode at a microcomputer, whereby the operation of a central processing unit is not required to transition to the low power consumption mode. The contents of the aforementioned patent documents are incorporated by reference to the extent necessary to understand the present invention.
When, however, each of the control registers is operated by the execution of the instruction by the central processing unit to control the stop or supply of the power and clocks to each functional block, the central processing unit should be caused to execute instructions for operating at least the control registers where the state of the stop or supply of the power and clocks to the functional blocks is changed. There also occurs a case where the supply of the power and clocks to the central processing unit being in operation stop should be resumed only for this purpose. It is not possible to reduce power consumption by the central processing unit as intended.
The technology of the patent document 1, which resumes the supply of the power and clocks using the interrupt power control table, realizes low power consumption in that the operation of the central processing unit is not required to release a low power consumption state, but does not take into consideration restoring the low power consumption state previously indicated by CPU or the like.
The technology disclosed in the patent document 2 realizes low power consumption in that the transition to the low power consumption mode is done by the external signal supplied from the external terminal to thereby make unnecessary the operation of the central processing unit upon the transition to the low power consumption mode, but does not take into consideration the release of the low power consumption mode.
There is a case where even though the transition to the low power consumption state (mode) is caused by input from the external terminal and restoring from the low power consumption state is conducted using an interrupt, it is necessary to adopt control based on priorities or arbitration between once-set low power consumption state and the release of its subsequent low power consumption state. Assuming that, for example, the process of restoring to the low power consumption state again after the low power consumption state is temporarily released and the required processing is conducted, is repeated, suitable control for releasing and restoring the low power consumption state may be necessary.